<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/commons/global.jsp" %>
<%@ include file="/commons/kindeditor.jsp" %>
<script type="text/javascript">
    $(function() {
    	//初始化类目选择和图片上传器
		TAOTAO.init({fun:function(node){}});
        $('#globalEditForm').form({
            url : '${path}/admin/global/edit',
            onSubmit : function() {
                progressLoad();
                var isValid = $(this).form('validate');
                if (!isValid) {
                    progressClose();
                }
                return isValid;
            },
            success : function(result) {
                progressClose();
                result = $.parseJSON(result);
                if (result.success) {
                    parent.$.modalDialog.openner_dataGrid.datagrid('reload');//之所以能在这里调用到parent.$.modalDialog.openner_dataGrid这个对象，是因为user.jsp页面预定义好了
                    parent.$.modalDialog.handler.dialog('close');
                } else {
                    parent.$.messager.alert('错误', result.msg, 'error');
                }
            }
        });
    });
</script>
<div style="padding:10px 10px 10px 10px">
        <form id="globalEditForm" method="post" enctype="multipart/form-data">
            <table class="grid">
				<input id="id" name="id" type="hidden" value="${global.id}" />
                <tr>
                    <td>父ID:</td>
					<td>
						<input id="pid" name="pid" type="text" placeholder="请输入父ID" class=" easyui-textbox" data-options="required:true"  value="${global.pid}" />
					</td>
				</tr>
                <tr>
                    <td>路径:</td>
					<td>
						<input id="path" name="path" type="text" placeholder="请输入路径" class=" easyui-textbox" data-options="required:true"  value="${global.path}" />
					</td>
				</tr>
                <tr>
                    <td>层级:</td>
					<td>
						<input id="level" name="level" type="text" placeholder="请输入层级" class=" easyui-textbox" data-options="required:true"  value="${global.level}" />
					</td>
				</tr>
                <tr>
                    <td>中文名称:</td>
					<td>
						<input id="name" name="name" type="text" placeholder="请输入中文名称" class=" easyui-textbox" data-options="required:true"  value="${global.name}" />
					</td>
				</tr>
                <tr>
                    <td>英文名称:</td>
					<td>
						<input id="nameEn" name="nameEn" type="text" placeholder="请输入英文名称" class=" easyui-textbox" data-options="required:true"  value="${global.nameEn}" />
					</td>
				</tr>
                <tr>
                    <td>中文拼音:</td>
					<td>
						<input id="namePinyin" name="namePinyin" type="text" placeholder="请输入中文拼音" class=" easyui-textbox" data-options="required:true"  value="${global.namePinyin}" />
					</td>
				</tr>
                <tr>
                    <td>代码:</td>
					<td>
						<input id="code" name="code" type="text" placeholder="请输入代码" class=" easyui-textbox" data-options="required:true"  value="${global.code}" />
					</td>
				</tr>
            </table>
        </form>
    </div>
